package cn.ultrarisk.scadmin.manager.biz.stat.dto;

import java.io.Serializable;
import java.util.Map;
import java.util.TreeMap;

/**
 * StatisticsSerie
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/5/26
 * @since V1.0
 */
public class HighchartSerie implements Serializable {
    private static final long serialVersionUID = 1919889212554582665L;

    private String name;
    private Map<Object, Object> data;
    private String stack;

    public HighchartSerie() {
    }

    public HighchartSerie(String name) {
        this.name = name;
    }

    public HighchartSerie(String name, Map<Object, Object> data) {
        this.name = name;
        this.data = data;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Map<Object, Object> getData() {
        return data;
    }

    public void setData(Map<Object, Object> data) {
        this.data = data;
    }

    public void addData(Object key, Object val) {
        if (data == null) {
            data = new TreeMap<Object, Object>();
        }
        if (key != null) {
            data.put(key, val);
        }
    }

    public String getStack() {
        return stack;
    }

    public void setStack(String stack) {
        this.stack = stack;
    }
}
